package de.dnb.basics.filtering;

import de.dnb.basics.applicationComponents.RangeCheckUtils;

/**
 * Filterkriterium NICHT.
 * 
 * @author Michael Inden
 * 
 * Copyright 2011 by Michael Inden 
 */
public class Not<T> implements IPredicate<T> {
	private final IPredicate<T> predicate;

	public Not(final IPredicate<T> predicate) {
		RangeCheckUtils.assertReferenceParamNotNull("predicate", predicate);

		this.predicate = predicate;
	}

	@Override
	public final boolean accept(final T object) {
		return !(predicate.accept(object));
	}
}
